package com.zxc.judgeservice.codesandbox;


import com.zxc.judgeservice.codesandbox.impl.ExampleCodeSandbox;
import com.zxc.judgeservice.codesandbox.impl.RemoteCodeSandbox;
import com.zxc.judgeservice.codesandbox.impl.ThiredPartyCodeSandbox;

public class CodeSandboxFactory {
    public static CodeSandbox buildCodeSandbox(String type) {

        switch (type) {
            case "example":
                return new ExampleCodeSandbox();
            case "remote":
                return new RemoteCodeSandbox();
            case "thiredParty":
                return new ThiredPartyCodeSandbox();
            default:
                return new ExampleCodeSandbox();
        }
    }
}
